using System;

namespace MathService
{
    public class LambdaFormatProvider : IFormatProvider
    {
        private readonly Func<Type, object> f_Formatter;
        public LambdaFormatProvider(Func<Type, object> Formatter) { f_Formatter = Formatter; }

        public object GetFormat(Type formatType) { return f_Formatter(formatType); }
    }
}